﻿<!doctype html>
<html>
<head>
    <title>微街秀 > 收藏</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" type="text/css" href="css/css.css">
    <link rel="stylesheet" type="text/css" href="css/MakeresultDetail.css">
    <script src="js/ajax-data.js" type="text/javascript"></script>
    <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
</head>
<body>
    <div>
        <div class="wamtop">
            <div class="topleft">
                <img src="img/5.jpg" /></div>
            <div class="topcententxt title"></div>
        </div>
        <div class="tg_select">
            <div style="width: 100%; border-bottom: 1px #ccc solid; background: white;">
                <div class="floatLeft">
                    标题：</div>
                <div style="width: 95%; padding-top: 10px; line-height: 30px; margin-left: 77px;margin-bottom: 10px;
                    color: #909090; width: auto; padding-right: 20px;">
                    <a href="javascript:" class="a_title"></a>
                </div>
            </div>
            <div class="selTag _price" style="display:none;">
                <div class="floatLeft">
                    红 包：</div>
                <div class="floatRgiht price"></div>
            </div>
            <div class="selTag">
                <div class="floatLeft">
                    微信号：</div>
                <div class="floatRgiht wx_name"></div>
            </div>
            <div class="selTag">
                <div class="floatLeft">
                    时 间：</div>
                <div class="floatRgiht date"></div>
            </div>
            <div class="selTag">
                <div class="floatLeft">
                    区 域：</div>
                <div class="floatRgiht areaname"></div>
            </div>
            <div class="bottonline">
            </div>
            <div>
                <div class="floatLeft">
                    分享截图：</div>
                <div class="floatRgihtimg picurl">                    
                </div>
            </div>
        </div>
    </div>
     <script>
         var page = 1;
         var article_id = "0";
         $(document).ready(function () {
             $(".topleft").bind("click", GoBack);
             if (getQueryString("isad") =="0")
                 $("._price").css("display", "");
             load(page);
         });
         function load(page) {
             if (!islogin()) { window.location.href = 'login.html'; return; }
             var id = getUrlArgStr("id");
             if (id == "") return;
             AjaxStart("ajax/fc_shared.ashx?get", "&id=" + id, function (data) {
                 loadhtml(data.item);
             });
         }
         function loadhtml(item) {
             if (item["direction"] == 2) {
                 Alert("参数无效")
                 return;
             }
             article_id = item["article_id"];
             var title = item["title"];
             if (title.length > 12)
                 title = title.substr(0, 12) + "...";
             $(".title").html(title);
             $(".a_title").html(item["title"]);
             $(".a_title").bind("click", GoDetail);
             $(".price").html(item["price"] + "元");
             $(".wx_name").html(item["wx_name"]);
             if (item["area1"] != null)
                 $(".areaname").html(item["area1"]);
             if (item["area2"] != null)
                 $(".areaname").html($(".areaname").html() + "-" + item["area2"]);
             if (item["area3"] != null)
                 $(".areaname").html($(".areaname").html() + "-" + item["area3"]);

             $(".date").html(item["date"].replace("T", " ").substring(0, 19));
             if (item["picurl"] != null)
                 $(".picurl").append("<img src='" + item["picurl"] + "'/>");
             else {
                 if (item["price"] == 0) {
                     var sysDate = new Date();
                     if (Date.parse(sysDate) > GetMaxTime(item["date"].substr(0, 16).replace("T", " ")))
                         $(".picurl").html("<span style='color:red'>未上传分享截图，红包已失效</span>");
                 } else
                     $(".picurl").html("<span style='color:red'>未上传分享截图</span>");
             }
         }

         function GoBack() {
             history.go(-1);
         }
         function GoDetail() {
             window.location.href = 'fc_detail.aspx?article_id=' + article_id;
         }
         function GetMaxTime(date) {
            var d = new Date(date);
            d.setMinutes(360);
            return Date.parse(d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " " + d.getHours() + ":" + d.getMinutes());
        }
    </script>
</body>
</html>
